<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head><title></title>
<link href="../style/ebook.css" type="text/css" rel="stylesheet">
</head>
<body>
<h1>Using the Test Mode Configuration</h1>
<p>Airflow has a fixed set of &#x201C;test mode&#x201D; configuration options. You can load these
at any time by calling <code class="docutils literal notranslate"><span class="pre">airflow.configuration.load_test_config()</span></code> (note this
operation is not reversible!). However, some options (like the DAG_FOLDER) are
loaded before you have a chance to call load_test_config(). In order to eagerly load
the test configuration, set test_mode in airflow.cfg:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="o">[</span>tests<span class="o">]</span>
<span class="nv">unit_test_mode</span> <span class="o">=</span> True
</pre>
</div>
</div>
<p>Due to Airflow&#x2019;s automatic environment variable expansion (see <a class="reference internal" href="set-config.html"><span class="doc">Setting Configuration Options</span></a>),
you can also set the env var <code class="docutils literal notranslate"><span class="pre">AIRFLOW__CORE__UNIT_TEST_MODE</span></code> to temporarily overwrite
airflow.cfg.</p>
</body>
</html>